/**
 * 
 */
$(document).ready(function() {
	$("#submit").click(function() {
		var info = {
			userId : $("#inputEmail").val(),
			psd : $("#inputPassword").val()
		}
//		alert($.toJSON(info));
		$.ajax({
			url : '../login.action',
			type : 'post',
			data : {
				userInfo : $.toJSON(info)
			},
			dataType : 'json',
			success : function(data) {
				var result = eval("(" + data + ")")
				if (result.flag == "true") {
					sessionStorage.setItem("userId", $("#inputEmail").val());
					sessionStorage.setItem("state",result.state);
					sessionStorage.setItem("epState", result.epState);
					location.href = "ExamProcess.html";
				} else {
					alert(result.info);
				}

			}
		})

	});
});